package org.news.beans.mapper;

import org.news.beans.Users;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;


public class UsersMapper implements RowMapper<Users> {

    @Override
    public Users mapRow(ResultSet resultSet, int i) throws SQLException {
        Users u = new Users();
        u.setUserid(resultSet.getInt("userid"));
        u.setUsername(resultSet.getString("username"));
        u.setUserpwd("");
        return u;
    }
}
